package com.liulimi.fastapi.utils.serial;

/**
 * @author chenhao
 * @date 2021/1/13
 * @email 414338069@qq.com
 **/
public class SnowflakesUtil {
    private static final int WORK_ID = 0;
    private static final int DATA_CENT_ID = 0;
    static SnowflakesTools idWorker;

    static {
        idWorker = new SnowflakesTools(WORK_ID, DATA_CENT_ID);
    }

    public static Long getSnowFlakeNumber(){
        return idWorker.nextId();
    }
}
